import request from '@/utils/request';

export function getProvinceList(param){
    return request({
        url: '/area/getProvinceList.do',
        method: 'post',
        data: param
    });
}

export function addProvince(provinceInfo){
    return request({
        url: '/area/addProvince.do',
        method: 'post',
        data: provinceInfo
    });
}

export function updateProvince(provinceInfo){
    return request({
        url: '/area/updateProvince.do',
        method: 'post',
        data: provinceInfo
    });
}

export function deleteProvince(id){
    return request({
        url: `/area/deleteProvince.do/${id}`,
        method: 'delete',
    });
}

export function getCityList(info) {
    return request({
        url: '/area/getCityList.do',
        method: 'post',
        data: info
    });
}

export function addCity(cityInfo){
    return request({
        url: '/area/addCity.do',
        method: 'post',
        data: cityInfo
    });
}

export function updateCity(cityInfo){
    return request({
        url: '/area/updateCity.do',
        method: 'post',
        data: cityInfo
    });
}

export function deleteCity(id){
    return request({
        url: `/area/deleteCity.do/${id}`,
        method: 'delete',
    });
}

export function getDistrictList(districtInfo) {
    return request({
        url: '/area/getDistrictList.do',
        method: 'post',
        data: districtInfo
    });
}

export function addDistrict(districtInfo){
    return request({
        url: '/area/addDistrict.do',
        method: 'post',
        data: districtInfo
    });
}

export function updateDistrict(districtInfo){
    return request({
        url: '/area/updateDistrict.do',
        method: 'post',
        data: districtInfo
    });
}
export function deleteDistrict(id){
    return request({
        url: `/area/deleteDistrict.do/${id}`,
        method: 'delete',
    });
}

export function getAbroadList(info){
    return request({
        url: '/area/getAbroadList.do',
        method: 'post',
        data: info
    });
}
export function addAbroad(info){
    return request({
        url: '/area/addAbroad.do',
        method: 'post',
        data: info
    });
}

export function deleteAbroad(id){
    return request({
        url: `/area/deleteAbroad.do/${id}`,
        method: 'delete',
    });
}

export function updateAbroad(abroadInfo){
    return request({
        url: '/area/updateAbroad.do',
        method: 'post',
        data: abroadInfo
    });
}